home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 0514.ZIP / CRAYZ15.ARC / VOUT.PAS < prev    next >
Pascal/Delphi Source File  |  1986-08-01  |  1KB  |  43 lines

  1. { Copyright (C) 1986 Adam Fritz, 133 Main St., Afton, NY 13730 }
  2.  
  3. procedure vOUT ( var fID ;
  4.                        n : integer ) ;
  5.  
  6.      { Special purpose output routine for the matrix A     }
  7.      { which has leading dimension lda and is n by n.      }
  8.      {                                                     }
  9.      { Adam Fritz, TURBO Pascal, 08/02/86                  }
  10.  
  11. var
  12.      gID            : vARRAY Absolute fID ;
  13.      is,ns          : integer ;
  14.      ir             : integer ;
  15.      ic,cn,cx,nc,mc : integer ;
  16.      iA             : integer ;
  17.      A              : array[1..5] of VECTOR ;
  18.  
  19. begin
  20.    if n > 1 then begin
  21.       ns :=  (n + 4) div 5 ;
  22.       for is := 1 to ns do begin
  23.          cn := (is-1)*5 + 1 ;
  24.          cx := cn + 4 ;
  25.          if cx > n then
  26.             cx := n ;
  27.          nc := cx - cn + 1 ;
  28.          for ic := cn to cx do begin
  29.             mc := (ic-1) mod 5 + 1 ;
  30.             iA := VectorRead(gID,n,1,ic,n,A[mc])
  31.          end ;
  32.          for ir := 1 to n do begin
  33.             for ic := 1 to nc do
  34.                write (A[ic][ir]:14, ' ') ;
  35.             writeln
  36.          end ;
  37.          writeln
  38.       end
  39.    end
  40. end ;
  41.  
  42. { Copyright (C) 1986 Adam Fritz, 133 Main St., Afton, NY 13730 }
  43.